package com.zhuoyue.biz.core.command.cmd.common.fe6.base;

/**
 * 空调风速
 * @author Administrator
 */
public enum AcWindSpeedEnum {
    /**
     * 低风速
     */
    LOW("LOW", "01"),

    /**
     * 中风速
     */
    MID("MID", "02"),

    /**
     * 高风速
     */
    HIGH("HIGH", "03"),

    /**
     * 自动
     */
    AUTO("AUTO", "04");

    private String name;
    private String value;

    AcWindSpeedEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByName(String name) {
        AcWindSpeedEnum[] values = AcWindSpeedEnum.values();
        for (AcWindSpeedEnum acWindSpeed : values) {
            if (acWindSpeed.name.equalsIgnoreCase(name)) {
                return acWindSpeed.getValue();
            }
        }
        return "FF";
    }

    public static String getNameByValue(String value) {
        AcWindSpeedEnum[] values = AcWindSpeedEnum.values();
        for (AcWindSpeedEnum acWindSpeed : values) {
            if (acWindSpeed.value.equalsIgnoreCase(value)) {
                return acWindSpeed.getName();
            }
        }
        return "出错";
    }
}
